import styled from 'styled-components'
import Icon from '@/components/Icon'
import { StyledMediaContainer } from '@/style/global'
import homeNormal from '@img/home_btn_normal.png'
import homeHover from '@img/home_btn_hover.png'
/* Icon相关 */

export const SplitIcon = styled(Icon)`
	background-position: -18px -59px;
	width: 10px;
	height: 16px;
	margin-left: 6px;
`
export const StyledHomeContainer = styled.div`
	cursor: pointer;
`
export const HomeIcon = styled.div`
	background-image: url(${homeNormal});
	height: 18px;
	width: 18px;
	margin-right: 4px;
	${StyledHomeContainer}:hover & {
		background-image: url(${homeHover});
	}
`
export const HeaderIcon = styled(Icon)`
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0 5px;
`
export const SettingIcon = styled(HeaderIcon)`
	background-position: -96px -110px;
	&:hover {
		background-position: -144px -110px;
	}
`
export const ExitIcon = styled(HeaderIcon)`
	margin-right: 0;
	background-position: -192px -109px;
	&:hover {
		background-position: -240px -109px;
	}
`
export const MsgIcon = styled(HeaderIcon)`
	background-position: 0px -110px;
	&:hover {
		background-position: -48px -110px;
	}
`
export const ReadyIcon = styled(Icon)`
	background-position: 0 -766px;
	position: absolute;
	top: 2px;
	right: 0;
	width: 5px;
	height: 5px;
`
export const WarningIcon = styled(Icon)`
	background-position: -480px -75px;
	width: 24px;
	height: 24px;
`
export const ClearIcon = styled(Icon)`
	background-position: -2px -748px;
	width: 16px;
	height: 16px;
	clear: none;
`
/*样式布局 */
export const StyledWrap = styled.div`
	height: 54px;
	width: 100%;
	background: #373d41;
	min-width: 1024px;
	* {
		box-sizing: border-box;
	}
	ul {
		list-style: none;
		padding: 0;
		margin: 0;
	}
	a {
		color: #333;
		text-decoration: none;
	}
`
export const StyledHeader = styled(StyledMediaContainer)`
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
	color: #ffffff;
	.header-left {
		display: flex;
		align-items: center;
		.company-info {
			display: flex;
			align-items: center;
			cursor: pointer;
			.compony-logo {
				width: 116px;
				height: 16px;
				line-height: 16px;
			}
			.company-title {
				margin-left: 8px;
				font-size: 13px;
				font-weight: bold;
			}
		}
		.home {
			display: flex;
			align-items: center;
			margin-left: 64px;
			font-size: 14px;
			color: #fff;
			cursor: pointer;
			line-height: 18px;
			&:hover {
				color: #26a5ff;
			}
		}
	}
	.header-right {
		display: flex;
		height: 24px;
		line-height: 24px;
		font-size: 12px;
		.userInfo {
			display: flex;
			margin-right: 18px;
			.avatar {
				width: 24px;
				height: 24px;
				border-radius: 50%;
				margin-right: 5px;
				overflow: hidden;
			}
		}
	}
`
export const StyledNotifyWrap = styled.div`
	width: 350px;
	height: 257px;
	border: 1px solid #c6c6c6;
	color: #434343;
	padding: 13px 15px 5px;
	cursor: default;
	background: #fff;
	font-size: 12px;
	border-radius: 6px;
	.notify-top {
		display: flex;
		height: 28px;
		line-height: 28px;
		justify-content: space-between;
		.notify-title {
			font-weight: 600;
		}
		.notify-clear-all {
			color: #007ac0;
			text-decoration: underline;
			font-size: 12px;
			font-weight: 400;
			cursor: pointer;
		}
	}
	.line {
		border-bottom: 1px solid #c7c7c7;
		height: 1px;
		margin: 4px 0;
	}
	.notify-list {
		overflow: auto;
		height: 200px;
		margin-top: 4px;
		.loading,
		.no-notice {
			color: #999999;
			font-size: 12px;
			text-align: center;
			padding-top: 10px;
		}
		.notify-info-li {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 43px;
			line-height: 43px;
			padding: 5px 10px;
			.notify-info {
				width: 253px;
			}
			&:hover {
				background-color: #2e8cc1;
				color: #ffffff;
				.notify-subject a {
					color: #ffffff;
				}
				.clear-notify {
					background-position: -23px -748px;
				}
			}
		}
		.notify-info {
			display: flex;
			flex: 1;
			.notify-type {
				padding-left: 5px;
				width: 140px;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.notify-subject {
				flex: 1;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				cursor: pointer;
				a {
					font-weight: bold;
					color: #666666;
				}
			}
		}
	}
`
export const StyledSettingWrap = styled.div`
	width: 116px;
	background: #fff;
	padding: 10px 0;
	border: 1px solid #e5e5e5;
	font-size: 12px;
	color: #333;
	cursor: default;
	z-index: 1;
	border-radius: 6px;
	ul li {
		height: 30px;
		line-height: 30px;
		text-align: left;
		cursor: pointer;
		a {
			color: #4e4e4e;
			display: block;
			padding: 0 30px;
		}
		span {
			padding: 0 30px;
		}
		&:hover {
			background: #46aae4;
			color: #fff;
			a {
				color: #fff;
			}
		}
	}
`
